Release 10.1A: OpenEdge Development:
Progress Dynamics Advanced Development


Creating the other support functions

Now create the support functions to make this work. The widgetHandle function can be the same as in the viewer example, because it uses the same gcFields and gcHandles variables, even though those are derived from different object properties.

The widgetValue function, however, looks a little different because, as noted, you cannot reference the cell values of the browse cells from within the ROW-DISPLAY event. For this reason the code refers back to the SDO’s RowObject record buffer, captured from the QueryRowObject property, to get the field value from there, as shown:

FUNCTION widgetValue RETURNS CHARACTER 
  ( pcColumn AS CHARACTER   ) : 
/*------------------------------------------------------------------------- 
  Purpose:  Returns the value of the requested browse column 
            from the RowObject buffer. 
   Params:  INPUT pcColumn AS CHARACTER 
    Notes:   
-------------------------------------------------------------------------*/ 
DEFINE VARIABLE hField AS HANDLE     NO-UNDO. 
  hField = ghBuffer:BUFFER-FIELD(pcColumn). 
  RETURN STRING(hField:BUFFER-VALUE). 
END FUNCTION. 

The highlightWidget function, like any other functions that just use widgetHandle and widgetValue, can be the same code as for the viewer example.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095